import { configureStore } from '@reduxjs/toolkit'
import userReducer from './modules/userReducer'
import componentsReducer from './modules/componentsReducer'
import pageInfoReducer from './modules/pageInfoReducer'
import undoable, { excludeAction } from 'redux-undo'

export default configureStore({
  reducer: {
    user: userReducer,
    components: undoable(componentsReducer, {
      limit: 10,
      filter: excludeAction(['components/resetComponents', 'components/changeSelectedId']),
    }),
    pageInfo: pageInfoReducer,
  },
})
